package org.lemon.cla.dto.request;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.lemon.cla.enums.NewsCategoryEnum;

import java.time.LocalDateTime;

@Data
@Schema(description = "新闻模糊查询请求对象")
public class NewsSearchRequest {

    @Schema(description = "新闻标题关键词 (模糊查询)", example = "图书馆")
    private String title;

    // 添加发布者姓名，用于联表模糊查询
    @Schema(description = "发布者姓名关键词 (模糊查询)", example = "管理员A")
    private String publisherName;

    @Schema(description = "发布时间的起始点 (模糊查询)", example = "2023-01-01T00:00:00")
    private LocalDateTime publishTimeStart;

    @Schema(description = "发布时间的结束点 (模糊查询)", example = "2023-12-31T23:59:59")
    private LocalDateTime publishTimeEnd;

    @Schema(description = "新闻类别", example = "学术", allowableValues = {"学术", "事件", "通知"})
    private NewsCategoryEnum category;
}